//
//  Entry.h
//  CEDict
//
//  Created by Eric Nadeau on 07-06-01.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface Entry : NSObject		

{
	// The simplified characters for this word
	NSString* simplified;
	
	// The traditional characters for this word
	NSString* traditional;
	
	// The pinyin with tones for this word, for example ni3 hao4
	NSString* pinyin;
	
	// An NSString array of English words or definitions
	NSArray* english;
}

// private method
// Determines if any of the elements in the array contains the given query string
+(bool) 
	oneOfContains: (NSArray*) inputs
			query: (NSString*) query;

// private method
// Determines if a given string is present inside another
+(bool)
	contains: (NSString*) input
	  query: (NSString*) query
	;

	// Determines if this Entry matches the given query
-(bool) matches: (NSString*)query;

// Initializes this Entry with given values
-(Entry*)	initWithSimplifed: (NSString*) s 
			andTraditional: (NSString*) t 
			andPinyin: (NSString*) p 
			andEnglish: (NSArray*) e;

-(NSString*) simplified;
-(NSString*) traditional;
-(NSString*) pinyin;
-(NSArray*) english;

@end
